<?php

namespace App\Transformers;

use App\Models\Banner;

class BannerTransformer extends BaseTransformer
{
    public function transform(Banner $model)
    {
        return [
            'id' => $model->id,
            'title' => $model->title,
            'description' => $model->description,
            'content' => $model->content,
            'image' => image_url($model->image),
            'is_show' => $model->is_show,
            'url' => $model->url,
            'created_at' => $model->created_at->toDateTimeString(),
        ];
    }
}
